"use client"; import { BarList, type BarListItem } from "@/components/ui/charts"; import { fmtInt, fmtMw } from "@/lib/format"; /** Server pages cannot pass `format` functions to the client BarList — pick the formatter by name here. */ export function CountBarList({ items, unit = "count", showRank = true, className }: { items: BarListItem[]; unit?: "count" | "mw"; showRank?: boolean; className?: string }) { return fmtMw(v) : (v) => fmtInt(v)} showRank={showRank} className={className} />; }